#include "webviewdialog.h"
#include "ui_webviewdialog.h"

WebViewDialog::WebViewDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::WebViewDialog)
{
    ui->setupUi(this);
}

WebViewDialog::~WebViewDialog()
{
    delete ui;
}

void WebViewDialog::on_backButton_clicked()
{
    ui->webView->back();
}

void WebViewDialog::on_forwardButton_clicked()
{
    ui->webView->forward();
}

void WebViewDialog::on_refreshButton_clicked()
{
    ui->webView->reload();
}

void WebViewDialog::on_goButton_clicked()
{
    ui->webView->load(QUrl("http://"+ui->lineEdit->text()));
}

void WebViewDialog::on_lineEdit_editingFinished()
{
    on_goButton_clicked();
}
